﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %> 
<%
String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />

		<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
		
		<script language="JavaScript" src="<%=path %>/js/public.js" type="text/javascript"></script>
		
        <script language="javascript">
           function gonggaoAdd()
           {
              var url="<%=path %>/admin/gonggao/gonggaoAdd.jsp";
              window.location.href=url;
           }
           
           function gonggaoDetail(id)
           {
                 var url="<%=path %>/gonggao?type=gonggaoDetail&id="+id;
                 var n="";
                 var w="480px";
                 var h="500px";
                 var s="resizable:no;help:no;status:no;scroll:yes";
				 window.location.href=url;
           }
       </script>
	</head>

	<body leftmargin="2" topmargin="2" >
<table width='98%'  border='0' align="center">
         <tr>
    <td ><form action="<%=path %>/gonggao?type=gonggaoMana" name="formAdd" method="post">
        <input type="button" value="添加" style="width: 80px;" onclick="gonggaoAdd()" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" name="name" size="20" value="<%if(request.getParameter("name")!=null){out.print(request.getParameter("name"));} %>"/>
        <input  type="submit" value="搜索" />
      </form></td>
  </tr>
       </table>
			<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
				<tr bgcolor="#E7E7E7">
					<td height="14" colspan="4" background="<%=path %>/images/wbg.gif">&nbsp;&nbsp;</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">
					<td width="25%">标题</td>
					<td width="25%">发布时间</td>
					<td width="25%">内容</td>
					<td width="25%">操作</td>
		        </tr>	
				<c:forEach items="${requestScope.gonggaoList}" var="gonggao">
				<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
					<td bgcolor="#FFFFFF" align="center">
						 ${gonggao.title}
					</td>
					<td bgcolor="#FFFFFF" align="center">
						 ${gonggao.shijian}
					</td>
					<td bgcolor="#FFFFFF" align="center">
					    <a href="#" onclick="gonggaoDetail(${gonggao.id})" class="pn-loperator">查看内容</a>
					</td>
					<td bgcolor="#FFFFFF" align="center">
						<a class="pn-loperator" href="<%=path %>/gonggao?type=gonggaoDel&id=${gonggao.id}">删除</a>
					</td>
				</tr>
				</c:forEach>
			</table>
			
<table width='98%'  border='0'style="margin-top:8px;margin-left: 5px;">
         <TR align="right">
    <TD ><form action="" method="post" name="formpage">
        <input type="hidden" name="pageCount" value="${requestScope.pagecount}" />
        <!--//用于给上面javascript传值-->
        <input type="hidden" name="page" value="${requestScope.page}" />
        <!--//用于给上面javascript传值-->
        <input type="hidden" name="jumpurl" value="<%=path%>/gonggao?type=gonggaoMana&" />
        <!--//用于给上面javascript传值--> 
        <a href="#" onClick="PageTop()"><strong>首页</strong></a>&nbsp;&nbsp;&nbsp; <a href="#" onClick='PagePre()'><strong>上一页</strong></a>&nbsp;&nbsp;&nbsp;
        共${requestScope.cou}条记录,
        共计${requestScope.pagecount}页,
        当前第${requestScope.page}页&nbsp;&nbsp;&nbsp; <a href="#" onClick="PageNext()"><strong>下一页</strong></a>&nbsp;&nbsp;&nbsp; <a href="#" onClick="PageLast()"><strong>尾页</strong></a> 第
        <input name="busjump" type="text" size="3" value="${requestScope.page}" style=" width:15px"/>
        页<a href="#" onClick="bjump()"><strong>跳转</strong></a>&nbsp;&nbsp;&nbsp;
      </form>
             <script type="text/javascript" src="<%=path%>/js/page.js"></script></TD>
  </TR>
       </table>
	</body>
</html>
